/*
 * Copyright 2025 arisgo@163.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.arisgo.cloud.common.utils;

import java.util.Collection;
import java.util.Map;

/**
 * 参数验证工具
 *
 * @author Arisgo
 * @since 2024/1/20
 */
public class ArgsUtil {

    public static boolean validation() {
        return false;
    }

    public static boolean isEmpty(Collection<?> collections) {
        return null == collections || collections.isEmpty();
    }

    public static boolean isEmpty(Map<?, ?> map) {
        return null == map || map.isEmpty();
    }

    public static boolean isEmpty(Object... obj) {
        return null == obj || obj.length == 0;
    }

    public static boolean isEmpty(String... obj) {
        return null == obj || obj.length == 0;
    }

    public static boolean hasLength(String value) {
        return null == value || value.trim().isEmpty();
    }

    public static boolean isNull(Object object) {
        return null == object;
    }

    public static boolean notNull(Object object) {
        return !isNull(object);
    }

    public static boolean isAnyNull(Object... objects) {
        if (null == objects) {
            return true;
        }
        for (Object object : objects) {
            if (null == object) {
                return true;
            }
        }
        return false;
    }

}
